package cn.net.cfss.fgbp.api.console.constant;

import cn.net.cfss.fgbp.base.constant.BaseEnum;

import java.util.HashMap;
import java.util.Map;


public enum ConsoleResultEnum implements BaseEnum<ConsoleResultEnum, String> {



	SUCC("00", "成功"),
	FAIL("99", "失败"),
	ERR("98", "错误"),
	ERR_VAII("97", "报文格式错误"),
	OUT_TIME("96", "请求超时"),
	ERR_TOKEN("95","token已失效,请重新登录"),
	ERR_AUTH("94","没有权限"),
	ERR_TASK_STATE("93","任务状态不正确"),
	ERR_RESUBMIT("92","重复提交"),
	ERR_NO_SETPW("91","用户未修改密码"),
	ERR_NO_EMP("90","用户未绑定员工号" ),
	ERR_FTP("89","FTP异常" ),

	;
	private String value;
	private String displayName;


	ConsoleResultEnum(String value, String displayName) {
		this.value = value;
		this.displayName = displayName;

	}
	
	private static Map<String,ConsoleResultEnum> enumMap = new HashMap<String,ConsoleResultEnum>();
	private static Map<String,ConsoleResultEnum> respEnumMap = new HashMap<String,ConsoleResultEnum>();
	static {
		for(ConsoleResultEnum en : ConsoleResultEnum.values()){
			enumMap.put(en.getValue(), en);
		}
	}

	@Override
	public String getValue() {
		return this.value;
	}

	@Override
	public String getDisplayName() {
		return this.displayName;
	}
	public static ConsoleResultEnum getEnum(String value){
		return enumMap.get(value);
	}

}
